import BattleObj from "../logic/battle/BattleObj";
import Skill from "./Skill";

export default class SkillMgr {

    owner:BattleObj;
    activeSkills:Map<number, Skill> = new Map();//主动技能
    passiveSkills:Map<number, Skill> = new Map();//被动技能
    constructor(owner:BattleObj) {
        this.owner = owner;
    }

    public addPassiveSkill(skill:Skill) {
        this.passiveSkills.set(skill.id, skill);
    }


    releaseSkill() {
       //找出能放的

       //释放前处理
       //释放技能，释放子弹

       //释放后处理
       //释放效果要看是不是立即释放还是等子弹结束
    }


    /**
     * 
     * @param skillId 被动技能id
     * @param parentSkill 父技能实例
     * @param times 触发次数
     * @param triggerObj 哪个对象触发的此被动技能
     * @param isFirstHurt 是否是第一次伤害
     * @param hurt 伤害值
     * @param condition 条件参数
     */
    triggerPassiveSkill(skillId:number,parentSkill:Skill,times:number,triggerObj:BattleObj,isFirstHurt:boolean,hurt:number,condition:number[]) {

        //判断被动技能的主动技能限制，有些被动只能某些主动技能进行触发

        //获取被动技能配置的效果参数，遍历参数，获取效果器
        let skillEffectParams:number[][] =[]
        let multiEffectQueue:number[][] = []//多重效果队列
        let effectQueue:number[][] = []//单效果队列



    }
}